Page({
    data: {
        navbarActiveIndex: 0,
        navbarTitle: [
            "知识见解",
            "文件资源",
            "智库专栏",
            "关于智库"
        ]
    },
    onNavBarTap: function (event) {
        // 获取点击的navbar的index
        let navbarTapIndex = event.currentTarget.dataset.navbarIndex
        // 设置data属性中的navbarActiveIndex为当前点击的navbar
        this.setData({
            navbarActiveIndex: navbarTapIndex
        })

    },
    onBindAnimationFinish: function ({
                                         detail
                                     }) {
        // 设置data属性中的navbarActiveIndex为当前点击的navbar
        this.setData({
            navbarActiveIndex: detail.current
        })

    },
   onLoad:function(){
       wx.getSystemInfo({
         complete: (res) => {console.log(res);this.setData({systemHeight:res.windowHeight-50})},
       })
   }
})